<?php
$this->breadcrumbs = array(
	'权限管理',
);
?>

<h1>权限管理</h1>
<?php
$columns = array(
	array(
		'name' => 'userId',
		'type' => 'raw',
		'filter' => null,
		'value' => 'CHtml::link($data->user->username,array("user/view","id"=>$data->userId))'
	),
);
foreach (array_slice(UserAccess::getActiveRoles(), 0, 12) as $activeRole) {
	$columns[] = array(
		'name' => $activeRole,
		'type' => 'boolean',
		'filter' => JHTML::getBooleanValues(),
	);
}
$columns[] = array(
	'class' => 'CButtonColumn',
	'template' => '{update}',
);
$this
	->widget('zii.widgets.grid.CGridView',
		array(
			'id' => 'user-access-grid',
			'dataProvider' => $model->search(),
			'filter' => $model,
			'columns' => $columns,
		));
?>
